package sg.edu.nus.iss.jass.gui;

import java.awt.FlowLayout;
import java.awt.event.ActionListener;
import javax.swing.JPanel;

/**
 * <h5>ActionPanel to load the action buttons on the actual GUI form </h5>
 * This  abstract class is derived from JPanel to create the action buttons using Swing JButtons.
 * All the derived classes from this ActionPanel class must implement the addActionListener listener
 * method to register the action event notification and callback methods should be implemented on the 
 * FormPanel derived classes.
 * @author Kafoor Sammil
 * 
 */

public abstract class ActionPanel extends JPanel {
	
	
	private static final long serialVersionUID = 8824543610553425117L;
	
	/**
	 * Constructor to create the ActionPanel Object and this will create the ActionPanel with the FlowLayout to
	 * show the action buttons according to the flow layout .
	 */
	
	public ActionPanel(){
		super(null);
		setLayout(new FlowLayout());
	}
	
    /**
	 *  Abstract Method to register the event with the action listener. 
	 *  This method is called from the FormPanel for registering the action buttons on ActionPanel.
	 * @param actionListener
	 *            the listener interface for receiving action events.  
	 */
	public abstract void addActionListener(ActionListener actionListener);
	

}
